package com.shrcl.engineerprocess.domain.events;

import com.shrcl.engineerprocess.domain.EngineerCostEstimation;
import com.shrcl.engineerprocess.domain.events.EngineerCostEstimationEventsListener;
import com.shrct.businessprocess.project.RCProject;
import edu.fudan.mylang.pf.event.EntityEventsManager;
import java.util.Collection;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service("com.shrcl.engineerprocess.domain.events.EngineerCostEstimationEventsManager")
public class EngineerCostEstimationEventsManager extends EntityEventsManager<EngineerCostEstimation> {
  @Autowired(required = false)
  private Collection<EngineerCostEstimationEventsListener> listeners = com.google.common.collect.Lists.newArrayList();;
  
  protected Collection<EngineerCostEstimationEventsListener> getListeners() {
    return listeners;
  }
  
  public void fireSubmit(final EngineerCostEstimation entity) {
    for (edu.fudan.mylang.pf.event.IEntityEventsListner<?> listener : listeners) {
    	((EngineerCostEstimationEventsListener)listener).submit(entity);
    }
    
  }
  
  public void fireApprove(final EngineerCostEstimation entity) {
    for (edu.fudan.mylang.pf.event.IEntityEventsListner<?> listener : listeners) {
    	((EngineerCostEstimationEventsListener)listener).approve(entity);
    }
    
  }
  
  public void fireConnectToCBD(final EngineerCostEstimation entity, final RCProject project) {
    for (edu.fudan.mylang.pf.event.IEntityEventsListner<?> listener : listeners) {
    	((EngineerCostEstimationEventsListener)listener).connectToCBD(entity,project);
    }
    
  }
  
  public void fireCBDKickOff(final EngineerCostEstimation entity) {
    for (edu.fudan.mylang.pf.event.IEntityEventsListner<?> listener : listeners) {
    	((EngineerCostEstimationEventsListener)listener).CBDKickOff(entity);
    }
    
  }
  
  public void fireEngineerProjectKickOffNotify(final EngineerCostEstimation entity) {
    for (edu.fudan.mylang.pf.event.IEntityEventsListner<?> listener : listeners) {
    	((EngineerCostEstimationEventsListener)listener).engineerProjectKickOffNotify(entity);
    }
    
  }
}
